import { post, del } from '@/common/js/httpHelper'
import * as url from '@/common/js/interfaces'

// const getDisplayName = async (teamId) => {
//   const getDisplayNameUrl = '/rest/teamEndorser/displayName'
//   let parameter = {teamId: teamId}
//   const result = await get(getDisplayNameUrl, parameter)
//   return result.data
// }

const getTeamEndorserList = async (params) => {
  const result = await post(url.teamEndorserUrl + '/list', params)
  return result.data
}

const deleteTeamEndorser = async (params) => {
  return await del(url.teamEndorserUrl + '/' + params, params)
}

const addTeamEndorser = async (teamEndorser) => {
  return await post(url.teamEndorserUrl + '/addTeamEndorserWithTeamAndEndorser', teamEndorser)
}

export default {
  // getDisplayName: getDisplayName,
  getTeamEndorserList: getTeamEndorserList,
  deleteTeamEndorser: deleteTeamEndorser,
  addTeamEndorser: addTeamEndorser
}
